//
//  FirstViewController.m
//  LableTest
//
//  Created by 刘家俊 on 2017/7/12.
//  Copyright © 2017年 Andrew. All rights reserved.
//

#import "FirstViewController.h"
#import "YMStringSize.h"

@interface FirstViewController ()

@property (weak, nonatomic) IBOutlet UILabel *lable;
@property (weak, nonatomic) IBOutlet UILabel *lable2;

@end

@implementation FirstViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    NSString *text = @"人这一生要走很长很长的路，沿途必定要经过很多风景，其中当然不乏让你怦然心动的美丽风景。但你要清楚，不是所有你喜欢的风景都能属于你。有些风景，你只能是路过，只能是欣赏，然后，要毅然决然地继续向前，走自己的路。";
    
    //标点符号居中
    self.lable.font = [UIFont fontWithName:@"PingFangHK-Light"size:13.f];
    //标点符号下方
    self.lable2.font = [UIFont fontWithName:@"PingFangSC-Light"size:13.f];
    
    //label
    CGSize labelSize = [YMStringSize ym_sizeWithText:text font:[UIFont systemFontOfSize:15] maxW:SCREENWIDTH];
    UILabel *label0 = [[UILabel alloc] init];
    label0.frame = (CGRect){{0,70},labelSize};
    label0.text = text;
    label0.numberOfLines = 0;
    label0.font = [UIFont systemFontOfSize:15];
    [self.view addSubview:label0];
}



@end
